using System;

namespace ThirdLife.UI.WinForms
{
  public class UIModuleServices : IUIModuleServices
  {
    private static IUIModuleServices _singleton;
    private readonly IRegistrationUIModuleServices _registration;
    private readonly IStartupUIModuleServices _startup;
    private readonly IMetaverseUIModuleServices _metaverse;
    private readonly ICommunicationUIModuleServices _communication;
    private readonly INavigationUIModuleServices _naviation;

    private UIModuleServices()
    {
      _startup = new StartupServices();
      _registration = new RegistrationServices();
      _metaverse = new MetaverseServices();
      _communication = new CommunicationServices();
      _naviation = new NavigationServices();
    }

    public static IUIModuleServices Instance
    {
      get
      {
        if (_singleton == null)
          _singleton = new UIModuleServices();
        return _singleton;
      }
    }

    #region IUIModuleServices Members

    public IStartupUIModuleServices Startup
    {
      get { return _startup; }
    }

    public ICommunicationUIModuleServices Communication
    {
      get { return _communication; }
    }

    public INavigationUIModuleServices Navigation
    {
      get { return _naviation; }
    }

    public IMetaverseUIModuleServices Metaverse
    {
      get { return _metaverse; }
    }

    public IRegistrationUIModuleServices Registration
    {
      get { return _registration; }
    }

    #endregion
  }
}